<template>
  <div>
    <articlenew
      :postData="item"
      v-for="item in newarr"
      :key="item.id"
    ></articlenew>
  </div>
</template>

<script>
import articlenew from "../components/articlenew";
export default {
  components: {
    articlenew,
  },
  data() {
    return {
      newarr: [],
    };
  },
  created() {
    //发送请求获取文章内容
    this.$axios({
      url: "/post",
    }).then((res) => {
      this.newarr = res.data.data;
    });
  },
};
</script>

<style lang="less" scoped>
</style>